import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class HandleNews {

	public static final String urlheader="http://news.xaufe.edu.cn/";
	public static void main(String args[]) throws MalformedURLException,
			IOException {
		final String url = "http://news.xaufe.edu.cn/Class.asp?ID=10&page=2";
		Document doc = Jsoup.parse(new URL(url), 1000);

		// System.out.println(doc);
		Element ele = doc.select("div#content").first();
		Elements elem = ele.getElementsByTag("li");
		for (Element e : elem) {
			String href =e.select("a").attr("href");
			String title=e.select("a").text();
			String date = e.getElementsByTag("span").first().text();
			href=urlheader+href;
			System.out.println(href);
			System.out.println(title);
			System.out.println(date);
			System.out.println(WebViewUtils.getSub(href));

		}

	}

}
